<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
	xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:s="/struts-tags"
	xmlns:sj="/struts-jquery-tags">
	<jsp:directive.page language="java"
		contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />

	<center>
		<h1>Gestionar usuarios</h1>
	</center>
	<s:actionmessage cssClass="alert" />
	<s:actionerror cssClass="alert alert-error" />
	<div class="col-lg-10 col-lg-offset-1">
		<div class="well">
			<table class="table table-striped">
				<thead>
					<tr>
						<th>Nombre</th>
						<th>Apellido paterno</th>
						<th>Email</th>
						<th>Tipo Usuario</th>
						<th>Nick</th>
						<th>Acciones</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="listUsuario">
						<tr>
							<td><s:property value="nombre" /></td>
							<td><s:property value="apPaterno" /></td>
							<td><s:property value="email" /></td>
							<td><s:property value="tipoUsuario.nombre" /></td>
							<td><s:property value="nick" /></td>
							<td>
								<table>
									<tr>
										<td><a><img class="media-object"
												src="${pageContext.request.contextPath}/images/icons/edit.ico"
												title="editar" /></a></td>
										<td><a> <img class="media-object"
												src="${pageContext.request.contextPath}/images/icons/delete.ico"
												title="eliminar" />
										</a></td>
										<td><a
											href="${pageContext.request.contextPath}/usuarios/gestionar-usuario/${idUsuario}/show">
												<img class="media-object"
												src="${pageContext.request.contextPath}/images/icons/view.ico"
												title="eliminar" />
										</a></td>
									</tr>
								</table>
							</td>
						</tr>

					</s:iterator>
				</tbody>
			</table>
			<table class="col-lg-offset-5">
				<tr>
					<td><button class="btn btn-primary btn-lg"
							onclick="location.href='${pageContext.request.contextPath}/usuarios/gestionar-usuario/new'">Agregar
							Usuario</button></td>
				</tr>
			</table>
		</div>
	</div>
</jsp:root>